package cn.liit.weixin.core.basic.jsapi;

import cn.liit.weixin.core.basic.accesstoken.AccessTokenSupport;

/**
 * 获取jsapi_ticket线程
 * @author mypc
 *
 */
@Deprecated
public class JsapiTicketThread extends Thread{

	public void run() {
		try {
			JsapiTicket jsapiTicket = JsapiTicketSupport.loadJsapiTicket(JsapiTicketSupport.APIURL, AccessTokenSupport.getAccess_token());
			if(jsapiTicket != null){
				Thread.sleep((jsapiTicket.getExpires_in() -200) * 1000);
			}else{
				Thread.sleep(60 * 1000);
			}
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}
}
